package main;


	import java.io.IOException;
import java.util.Calendar;
import java.util.Date;

	public class TT extends Thread{
		public static int i =0;
		@Override
		public void run() {
			synchronized (this.getClass()) {
				Date d1= Calendar.getInstance().getTime();
			this.go();
			 Date d2=Calendar.getInstance().getTime();
		        long diff = d2.getTime() - d1.getTime();
		        long diffSeconds = diff / 1000 % 60;
		        System.out.println("ftp download seconds:" + diffSeconds);
			}
		}
		
		public  void go() {
			
				System.out.println(22222);
				JschSftpClient client = new JschSftpClient();
				client.connect("192.168.90.254", "weblogic", "weblogic", 22);
				try {
					client.download("/home/weblogic/"+(i%2+1)+".zip", "d:/c/"+(++i)+".zip");
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				client.disconnect();
				System.out.println(333);
			
		}
		
		public static void main(String[] args) {
			for (int i=0;i<1000;i++){
				new TT().start();
			}
		}

}
